package com.jubaopen.util;

import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;

import sun.misc.BASE64Encoder;

public class JBPEncoder {

	public static String MD5Encoder(String pwd) throws NoSuchAlgorithmException {
		MessageDigest md = MessageDigest.getInstance("MD5");
		BASE64Encoder base = new BASE64Encoder();
		String pwdAfter = base.encode(md.digest(pwd.getBytes()));
		return pwdAfter;
	}
}
